\(\int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx\) [684]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 30, antiderivative size = 36 \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 i}{d \sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \]

[Out]

2*I/d/(e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^(1/2)

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {3596, 3569} \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 i}{d \sqrt {a+i a \tan (c+d x)} \sqrt {e \cos (c+d x)}} \]

[In]

Int[1/(Sqrt[e*Cos[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]]),x]

[Out]

(2*I)/(d*Sqrt[e*Cos[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]])

Rule 3569

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(a*f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]

Rule 3596

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {\sqrt {e \sec (c+d x)}}{\sqrt {a+i a \tan (c+d x)}} \, dx}{\sqrt {e \cos (c+d x)} \sqrt {e \sec (c+d x)}} \\ & = \frac {2 i}{d \sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.04 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 i}{d \sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \]

[In]

Integrate[1/(Sqrt[e*Cos[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]]),x]

[Out]

(2*I)/(d*Sqrt[e*Cos[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]])

Maple [A] (verified)

Time = 10.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.89

method result size
default \(\frac {2 i}{d \sqrt {e \cos \left (d x +c \right )}\, \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}\) \(32\)
risch \(\frac {i \sqrt {2}}{\sqrt {e \cos \left (d x +c \right )}\, \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, d}\) \(46\)

[In]

int(1/(e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*I/d/(e*cos(d*x+c))^(1/2)/(a*(1+I*tan(d*x+c)))^(1/2)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (28) = 56\).

Time = 0.27 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.61 \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 i \, \sqrt {2} \sqrt {\frac {1}{2}} \sqrt {e e^{\left (2 i \, d x + 2 i \, c\right )} + e} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (-\frac {1}{2} i \, d x - \frac {1}{2} i \, c\right )}}{a d e} \]

[In]

integrate(1/(e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

2*I*sqrt(2)*sqrt(1/2)*sqrt(e*e^(2*I*d*x + 2*I*c) + e)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(-1/2*I*d*x - 1/2*I*
c)/(a*d*e)

Sympy [F]

\[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {1}{\sqrt {e \cos {\left (c + d x \right )}} \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]

[In]

integrate(1/(e*cos(d*x+c))**(1/2)/(a+I*a*tan(d*x+c))**(1/2),x)

[Out]

Integral(1/(sqrt(e*cos(c + d*x))*sqrt(I*a*(tan(c + d*x) - I))), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (28) = 56\).

Time = 0.33 (sec) , antiderivative size = 76, normalized size of antiderivative = 2.11 \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\frac {2 i \, \sqrt {-\frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1}}{\sqrt {a} d \sqrt {e} \sqrt {-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1}} \]

[In]

integrate(1/(e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

2*I*sqrt(-sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1)/(sqrt(a)*d*sqrt(e)*sqrt(-2*I*sin(d*x + c)/(cos(d*x + c) + 1
) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1))

Giac [F]

\[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\int { \frac {1}{\sqrt {e \cos \left (d x + c\right )} \sqrt {i \, a \tan \left (d x + c\right ) + a}} \,d x } \]

[In]

integrate(1/(e*cos(d*x+c))^(1/2)/(a+I*a*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(1/(sqrt(e*cos(d*x + c))*sqrt(I*a*tan(d*x + c) + a)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {e \cos (c+d x)} \sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {1}{\sqrt {e\,\cos \left (c+d\,x\right )}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]

[In]

int(1/((e*cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)),x)

[Out]

int(1/((e*cos(c + d*x))^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2)), x)